# -*- coding: utf-8 -*-
"""
Houzz 爬虫专用配置
"""

# 爬虫名称
SPIDER_NAME = 'houzz'

# 列表页爬虫配置
LIST_SCRAPER_CONFIG = {
    'MAX_WORKERS': 10,  # 列表页并发数
    'MIN_DELAY': 0,     # 最小延迟
    'MAX_DELAY': 0.5,   # 最大延迟
    'RETRY_COUNT': 0,
    'REQUEST_TIMEOUT': 20,
    'MAX_CONSECUTIVE_ERRORS': 20,
    'MAX_FAILURE_COUNT': 5
}

# 详情页爬虫配置
DETAIL_SCRAPER_CONFIG = {
    'MAX_WORKERS': 20,  # 详情页并发数
    'MIN_DELAY': 0,
    'MAX_DELAY': 0.3,
    'RETRY_COUNT': 0,
    'REQUEST_TIMEOUT': 15,
    'MAX_CONSECUTIVE_ERRORS': 20,
    'MAX_FAILURE_COUNT': 3
}

# 列表页配置
LIST_PAGE_CONFIG = {
    'START_PAGE': 1,
    'ITEMS_PER_PAGE': 15,
    'MAX_PAGES_PER_CATEGORY': 1000
}

# 类目配置 - 可以根据需要添加更多类目
CATEGORIES = []
# CATEGORIES = [
    # {
    #     "url": "https://www.houzz.com/professionals/kitchen-and-bath/probr0-bo~t_11790",
    #     "start_page": 1,
    #     "end_page": 1000,
    #     "name": "kitchen-and-bath"
    # }
#     # {
#     #     "url": "https://www.houzz.com/professionals/interior-designer/probr0-bo~t_11785",
#     #     "start_page": 1,
#     #     "end_page": 300,
#     #     "name": "interior-designer"
#     # },
#     # ... 更多类目
# ]
# CATEGORIES = [
#     {
#         "url": "https://www.houzz.com/professionals/architect/probr0-bo~t_11784",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "architect"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/kitchen-and-bath/probr0-bo~t_11790",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "kitchen-and-bath"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/interior-designer/probr0-bo~t_11785",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "interior-designer"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/design-build/probr0-bo~t_11793",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "design-build"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/lighting/probr0-bo~t_11794",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "lighting"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/kitchen-and-bath-remodelers/probr0-bo~t_11825",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "kitchen-and-bath-remodelers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/landscape-architect/probr0-bo~t_11788",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Landscape Architects & Landscape Designers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/landscape-contractors/probr0-bo~t_11812",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Landscape Contractors"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/general-contractor/probr0-bo~t_11786",
#         "start_page": 300,
#         "end_page": 1000,
#         "name": "general-contractor"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/adu-contractors/probr0-bo~t_34256",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "Accessory Dwelling Units (ADU)"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/home-remodeling/probr0-bo~t_34257",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Home Remodeling"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/home-additions-and-extensions/probr0-bo~t_34259",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Home Additions"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/siding-and-exterior/probr0-bo~t_11826",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Siding & Exteriors"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/fireplace/probr0-bo~t_11800",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Fireplaces"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/garage-doors/probr0-bo~t_11828",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Garage Door Sales & Repair"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/building-supplies/probr0-bo~t_11805",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Building Supplies"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/stone-pavers-and-concrete/probr0-bo~t_11824",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Stone, Pavers & Concrete"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/specialty-contractors/probr0-bo~t_11811",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Specialty Contractors"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/home-builders/probr0-bo~t_11823",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "home-builders"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/tile-and-stone-contractors/probr0-bo~t_33910",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "tile-and-stone-contractors"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/custom-countertops/probr0-bo~t_33909",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "custom-countertops"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/wine-cellars/probr0-bo~t_11841",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Wine Cellars"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/staircases/probr0-bo~t_11839",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "custom-countertops"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/carpenter/probr0-bo~t_11831",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "carpenter"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/cabinets/probr0-bo~t_11829",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "cabinets"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/hardwood-flooring-dealers/probr0-bo~t_28349",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "hardwood-flooring-dealers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/custom-closet-designers/probr0-bo~t_33907",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "custom-closet-designers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/basement-remodelers/probr0-bo~t_34261",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "basement-remodelers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/glass-and-shower-door-dealers/probr0-bo~t_27203",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "glass-and-shower-door-dealers"
#     },
#
#     {
#         "url": "https://www.houzz.com/professionals/bedding-and-bath/probr0-bo~t_11806",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Bedding & Bath"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/carpet-and-flooring/probr0-bo~t_11799",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Carpet Dealers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/doors/probr0-bo~t_11827",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Door Dealers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/environmental-services-and-restoration/probr0-bo~t_11813",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Environmental Services & Restoration"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/furniture-and-accessories/probr0-bo~t_11802",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Furniture & Accessories"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/furniture-refinishing-and-upholstery/probr0-bo~t_11840",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Furniture Repair & Upholstery"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/ironwork/probr0-bo~t_11834",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Ironwork"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/kitchen-and-bath-fixtures/probr0-bo~t_11804",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Kitchen & Bath Fixtures"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/windows/probr0-bo~t_11797",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Window Contractors"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/universal-design/probr0-bo~t_34260",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Universal Design"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/backyard-courts/probr0-bo~t_11838",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Backyard Courts"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/decks-and-patios/probr0-bo~t_11830",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Decks, Patios & Outdoor Enclosures"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/driveways-and-paving/probr0-bo~t_11832",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Driveway Installation & Maintenance"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/fencing-and-gates/probr0-bo~t_11833",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Fence Contractors"
#     },
#
#     {
#         "url": "https://www.houzz.com/professionals/lawn-and-sprinklers/probr0-bo~t_11835",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Gardeners & Lawn Care"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/hot-tub-and-spa-dealers/probr0-bo~t_28350",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Hot Tub & Spa Dealers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/outdoor-lighting-and-audio-visual-systems/probr0-bo~t_11836",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Outdoor Lighting & Audio Visual Systems"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/outdoor-play/probr0-bo~t_11837",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Outdoor Play Systems"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/spa-and-pool-maintenance/probr0-bo~t_28351",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Spa & Pool Maintenance"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/pools-and-spas/probr0-bo~t_11795",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Swimming Pool Builders"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/tree-service/probr0-bo~t_11821",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Tree Services"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/professional-organizers/probr0-bo~t_33908",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Professional Organizers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/artist-and-artisan/probr0-bo~t_11801",
#         "start_page": 1,
#         "end_page": 1000,
#         "name": "Custom Artists"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/handyman/probr0-bo~t_27204",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Handyman"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/home-staging/probr0-bo~t_11789",
#         "start_page": 1,
#         "end_page": 300,
#         "name": "Home Stagers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/movers/probr0-bo~t_27206",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Movers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/paint-and-wall-coverings/probr0-bo~t_11807",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Paint & Wall Coverings"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/painters/probr0-bo~t_27105",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Painters"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/photographer/probr0-bo~t_11792",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Photographers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/agents-and-brokers/probr0-bo~t_11822",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Real Estate Agents"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/roofing-and-gutter/probr0-bo~t_11819",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Roofing & Gutters"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/window-coverings/probr0-bo~t_11798",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Window Treatments"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/appliances/probr0-bo~t_11810",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Appliances"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/electrical-contractors/probr0-bo~t_11818",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Electricians"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/home-media/probr0-bo~t_11787",
#         "start_page": 1,
#         "end_page": 100,
#         "name": "Home Automation & Home Media"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/hvac-contractors/probr0-bo~t_11814",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Air Conditioning & Heating"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/plumbing-contractors/probr0-bo~t_11817",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Plumbers"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/septic-tanks-and-systems/probr0-bo~t_11815",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Septic Tank Systems"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/solar-energy-contractors/probr0-bo~t_11816",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Solar Energy Systems"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/carpet-cleaners/probr0-bo~t_27201",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Carpet & Upholstery Cleaners"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/chimney-cleaners/probr0-bo~t_27200",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Chimney Cleaners"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/exterior-cleaners/probr0-bo~t_27202",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Exterior Cleaners"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/house-cleaners/probr0-bo~t_27205",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "House Cleaners"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/rubbish-removal/probr0-bo~t_11820",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Junk Removal"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/pest-control/probr0-bo~t_27207",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Pest Control"
#     },
#     {
#         "url": "https://www.houzz.com/professionals/window-cleaners/probr0-bo~t_27209",
#         "start_page": 1,
#         "end_page": 30,
#         "name": "Window Cleaners"
#     },
# ]
